<h1>SQL Console</h1>
<form action="" method="post">
  <textarea name="query" rows="8" cols="40"><?php echo stripslashes($_POST['query']) ?></textarea><br />
  <input type="submit" value="submit &raquo;" accesskey="s" />
</form>
<hr />
<div id="response">
  <pre>
    <?php
    if(!$_POST['query'] == "") {
      $query = stripslashes($_POST['query']);
      echo $query."\n\n";
      print_r(sqlite_fetch_all(sqlite_query($db,$query)));
    }
    ?>
  </pre>
</div>
